from common.views import AuthTemplateView
from wehelp.models import KanJiaUserMaster


class PersonalHomeView(AuthTemplateView):
    template_name = 'account/personal_home.html'

    def get_context_data(self, **kwargs):
        kwargs['secure'] = self.request.is_secure()
        kwargs['kan_master_list'] = KanJiaUserMaster.objects.filter(user=self.request.user, status=KanJiaUserMaster.STATUS_VALID,
                                                                    info__shelve=True)
        return super(PersonalHomeView, self).get_context_data(**kwargs)
